using UnityEngine;
using System.Collections;

public class PlacingJob : Job {
	
	public bool complete;
	
	Job jobAtEnd;
	
	public PlacingJob(int nx, int ny, int nz):base(nx, ny, nz, 9){
		Controller.removeJob(this);
		complete = false;
	}
	
	public PlacingJob(int nx, int ny, int nz, Job endJob):base(nx, ny, nz, 9){
		Controller.removeJob(this);
		complete = false;
		jobAtEnd = endJob;
	}
	
	public bool workOn(Robot r){
		bool done = base.workOn(1000, r);
		
		r.hauling = false;
		//Debug.Log("No prob bob");
		complete = true;
		try {
			r.assignJob(jobAtEnd, true);
			return false;
		} catch {
			return true;
		}
	}
	
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}
}
